<template>
  <el-card class="m_t_b_10px xd-LearningHome-PoliticalNews-NewsDetail" shadow="hover">
    <div slot="header" class="clearfix">
      <p>
        <b v-text="detail.title"></b>
      </p>
      <div class="text_color_999999 text_size_7 desc">
        <span>发布日期：{{detail.createTime}}</span>
      </div>
    </div>
    <pre v-html="detail.content"></pre>
  </el-card>
</template>
<script>
export default {
  name: 'NewsDetail',
  data() {
    return {
      tid: '',
      detail: {
        title: '',
        content: '',
        createTime: ''
      }
    }
  },
  created() {
    this.tid = this.$route.query.tid
    this.getDetail()
  },
  methods: {
    getDetail() {
      utils.post('curriculum/curriculumStudyNotes/get', { id: this.tid }, res => {
        if (res.success) {
          this.detail = res.data
        }
      })
    }
  }
}
</script>
<style lang="less">
.xd-LearningHome-PoliticalNews-NewsDetail {
  .clearfix {
    text-align: center;
    .desc {
      span {
        margin-right: 25px;
      }
    }
  }
}
</style>